home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 2.4 KB | 87 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: SLCollec.cpp
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #include "FWFound.hpp"
-
- #ifndef SLCOLLEC_H
- #include "SLCollec.h"
- #endif
-
- #ifndef PRLIST_H
- #include "PRList.h"
- #endif
-
- #ifndef PRORDCOL_H
- #include "PROrdCol.h"
- #endif
-
- //========================================================================================
- // FW_CPrivLink
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma segment fwcollec
- #endif
-
- //========================================================================================
- // Global functions
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // FW_PrivNewLinkedList
- //----------------------------------------------------------------------------------------
-
- FW_HLinkedList FW_PrivNewLinkedList(FW_PlatformError* error)
- {
- FW_ERR_TRY
- {
- return new FW_CPrivLinkedList();
- }
- FW_ERR_CATCH
- return NULL;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_PrivDeleteLinkedList
- //----------------------------------------------------------------------------------------
-
- void FW_PrivDeleteLinkedList(FW_HLinkedList list)
- {
- // No try block necessary - Do not throw
- if (list)
- {
- FW_PrivOrderedCollection_RemoveAll(list);
- delete list;
- }
- }
-
- //----------------------------------------------------------------------------------------
- // FW_PrivNewLinkedListIterator
- //----------------------------------------------------------------------------------------
-
- FW_HLinkedListIterator FW_PrivNewLinkedListIterator(FW_HLinkedList list, FW_PlatformError* error)
- {
- FW_ERR_TRY
- {
- return new FW_CPrivLinkedListIterator(list);
- }
- FW_ERR_CATCH
- return NULL;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_PrivDeleteLinkedListIterator
- //----------------------------------------------------------------------------------------
-
- void FW_PrivDeleteLinkedListIterator(FW_HLinkedListIterator iterator)
- {
- // No try block necessary - Do not throw
- delete iterator;
- }
-